<!--用户操作弹窗-->
<ng-template #modalContent>
    <nz-spin [nzSpinning]="modalLoadingState">
        <form nz-form [formGroup]="dataForm" nzLayout="vertical">
            <div nz-row [nzGutter]="24">
                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label>字典类型</nz-form-label>
                        <nz-form-control>
                            <input [disabled]="true" nz-input [(ngModel)]="dictDataModel.dictType" [ngModelOptions]="{standalone: true}"/>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label nzRequired>数据标签</nz-form-label>
                        <nz-form-control [nzErrorTip]="errorUserNameTpl">
                            <input nz-input [(ngModel)]="dictDataModel.dictLabel" formControlName="dictLabel" placeholder="" />
                            <ng-template #errorUserNameTpl let-control>
                                <ng-container *ngIf="control.hasError('required')">不能为空</ng-container>
                            </ng-template>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label nzRequired>数据键值</nz-form-label>
                        <nz-form-control [nzErrorTip]="errorUserNameTpl">
                            <input nz-input [(ngModel)]="dictDataModel.dictValue" formControlName="dictValue" placeholder="" />
                            <ng-template #errorUserNameTpl let-control>
                                <ng-container *ngIf="control.hasError('required')">不能为空</ng-container>
                            </ng-template>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label>样式属性</nz-form-label>
                        <nz-form-control>
                            <input nz-input [(ngModel)]="dictDataModel.cssClass" formControlName="cssClass" placeholder="" />
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label nzRequired>显示排序</nz-form-label>
                        <nz-form-control [nzErrorTip]="errorUserNameTpl">
                            <input nz-input type='number' [(ngModel)]="dictDataModel.dictSort" formControlName="dictSort" placeholder="请输入角色顺序" />
                            <ng-template #errorUserNameTpl let-control>
                                <ng-container *ngIf="control.hasError('required')">不能为空</ng-container>
                            </ng-template>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label>回显样式</nz-form-label>
                        <nz-form-control >
                            <app-normal-select [value]='styleDict' [(selectKey)]='dictDataModel.listClass'></app-normal-select>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label>状态</nz-form-label>
                        <nz-form-control>
                            <nz-switch
                                [(ngModel)]="dictDataModel.status"
                                formControlName="status"
                                nzCheckedChildren="正常"
                                nzUnCheckedChildren="停用"
                            ></nz-switch>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col nzSpan="24">
                    <nz-form-item>
                        <nz-form-label>备注</nz-form-label>
                        <nz-form-control>
                            <input type='text' [(ngModel)]='dictDataModel.remark' formControlName="remark" placeholder="请输入备注" nz-input/>
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>
        </form>
    </nz-spin>
</ng-template>
<ng-template #modalFooter>
    <button nz-button nzType="primary" [disabled]="dataForm.invalid" [nzLoading]="saveLoadingState" (click)="onSave()">
        保存
    </button>
</ng-template>

